<?php if(!defined('CMS'))die?>
<article id="arptikojuma_katalogs_record_article">
	<div class="document_body_center_menu_record aprikojuma_katalogs_record" id="slider">
		<div class="document_body_center_menu_record_views">
			<?= $reads ?>
		</div>
		<div class="main-slider-content">
			<ul class="sliders-wrap-inner">
				<?php foreach($images as $image) : ?>
					<li class="items_li">
						<a href="<?= str_replace('_preview', null, $image[0]) ?>" class="gallery cboxElement">
							<img src="<?= $image[0] ?>" alt="" height="179" width="179" class="document_body_center_menu_record_image">
						</a>
					</li>
				<?php endforeach ?>
			</ul>
		</div>
		<div class="document_body_center_menu_record_description">
			<div id="record_left_arrow"></div>
			<div class="navigator-wrapper">
				<ul class="navigator-wrap-inner">
					<?php foreach($images as $image) : ?>
						<li class="record_image">
							<img src="<?= $image[0]?>" alt="" width="67" height="67">
						</li>
					<?php endforeach ?>
				</ul>
			</div>
			<div id="record_right_arrow"></div>
		</div>
	</div>
	<div id="aprikojuma_katalogs_preces_apraksts">
		<h1 id="aprikojuma_katalogs_preces_nosaukums"><?= $title?></h1>
		<?= $price ?>
		<div id="aprikojuma_katalogs_preces_piegade"><?= $deliver?></div>
		<p id="aprikojuma_katalogs_preces_piegades"><?= $deliver_text?></p>
	</div>
	<?php if ($advertisement) : ?>
		<div id="aprikojuma_katalogs_preces_advirtisment"><?= $advertisement ?></div>
	<?php endif ?>
</article>
<aside id="aprikojuma_katalogs_tabs">
	<div data-rel="aprikojuma_katalogs_tab_content_apraksts" class="aprikojuma_katalogs_tab"><a href="#"><h2><?= $description?></h2></a></div>
	<div data-rel="aprikojuma_katalogs_tab_content_atsauksme" class="aprikojuma_katalogs_tab selected"><a href="#">
            <h2><?= $reviews?></h2></a></div>
	<div data-rel="aprikojuma_katalogs_tab_content_informacija" class="aprikojuma_katalogs_tab"><a href="#"><h2><?= $information?></h2></a></div>
</aside>

<section id="aprikojuma_katalogs_tab_content_atsauksme">
	<?= $comments?>
</section>

<section id="aprikojuma_katalogs_tab_content_apraksts" class="aprikojuma_katalogs_tab_content">
	<article class="aprikojuma_katalogs_tab_content_article">
		<h3 class="aprikojuma_katalogs_tab_content_article_title"><?= $description?></h3>
		<div class="aprikojuma_katalogs_tab_content_article_text">
			<?= $text?>
		</div>
	</article>
</section>

<section id="aprikojuma_katalogs_tab_content_informacija" class="aprikojuma_katalogs_tab_content">
	<article class="aprikojuma_katalogs_tab_content_article">
		<h3 class="aprikojuma_katalogs_tab_content_article_title"><?= $information?></h3>
		<div class="aprikojuma_katalogs_tab_content_article_text">
			<?= $info?>
		</div>
	</article>
</section>
<script>
//<![CDATA[
$(function() {
    $("#aprikojuma_katalogs_tabs .aprikojuma_katalogs_tab").Tabs({
        OnBeforeSwitch: function(a){
            return true;
        }
    });

    $(".gallery").colorbox({rel:"gallery", transition:"fade"});

    var buttons = {
        previous:$('#slider #record_left_arrow') ,
        next:$('#slider #record_right_arrow')
    };
    $('#slider').lofJSidernews({
        interval : 4000,
        direction		: 'opacitys',
        easing			: 'easeInOutExpo',
        duration		: 1200,
        maxItemDisplay  : 2,
        navPosition     : 'horizontal', // horizontal
        navigatorHeight : 67,
        navigatorWidth  : 75,
        mainWidth		: 179,
        mainHeight		: 180,
        auto			: false,
        buttons			: buttons,
        mainItemSelector    : 'li',
        navInnerSelector	: 'ul',
        navSelector  		: 'li' ,
        navigatorEvent		: 'click'/* click|mouseenter */,
        wapperSelector: 	'.sliders-wrap-inner',
        startItem			: 0,
        navItemsSelector    : '.navigator-wrap-inner li',
        navOuterSelector    : '.navigator-wrapper'
    });
});
//]]>
</script>